package com.company.poker.channel;

import akka.actor.UntypedActor;
import akka.camel.CamelMessage;
import com.company.poker.protocol.ByteMessage;

/**
 * Description of class.
 * Created 4/10/13 6:36 PM
 *
 * @author andrey.rodin@playtech.com
 */

public class TableActor extends UntypedActor {
    @Override
    public void onReceive(Object message) {
        if (message instanceof CamelMessage) {
            CamelMessage msg = (CamelMessage) message;
            System.out.println(msg.body());
        }
        ByteMessage msg = (ByteMessage) message;
        System.out.println("TableActor <- "+msg.getBody());
        getSender().tell(msg, getSelf());
    }
}
